﻿using SqlSugar;
using System;
using System.IO;

namespace Zo.ExcelBox.Base
{
    /// <summary>
    /// 数据库
    /// </summary>
    public class DbContext
    {


        /// <summary>
        /// 数据库访问地址
        /// </summary>
        public static string ConnectionString = string.Empty;

        /// <summary>
        /// 数据访问
        /// </summary>
        public SqlSugarClient DataBase { get; } = new SqlSugarClient(new ConnectionConfig()
        {
            ConnectionString = ConnectionString,
            DbType = SqlSugar.DbType.Sqlite,
            InitKeyType = InitKeyType.Attribute,
            IsAutoCloseConnection = true
        });


        //$"DataSource={Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "db", "zo_excelbox.db")}"
      
    }
}
